﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Data;
using KPIS.GERP.GHRMS.DAL;
using KPIS.GERP.GHRMS.MODEL;
using KPIS.GERP.GHRMS.IDAL;
using KPIS.GERP.GHRMS.IBLL;
using KPIS.GERP.GHRMS.DALFactory;

namespace KPIS.GERP.GHRMS.BLL
{
    public class TrainingHistoryBLL : ITrainingHistoryBLL
    {
        private static readonly ITrainingHistoryDAL dal = DataAccess.CreateTrainingHis();

        public DataTable Search(int? intTrainHisId, string strQueryString, int? intCreateBy)
        {
            return dal.Search(intTrainHisId, strQueryString, intCreateBy);
        }

        public void Insert(string strQueryString, string strCouseName, string strInstituteName, string strLocationName
            , Nullable<DateTime> strStartDate, Nullable<DateTime> strEndDate, string strRemark, int? intCreateBy)
        {
            dal.Insert(strQueryString, strCouseName, strInstituteName, strLocationName, strStartDate,
                strEndDate, strRemark, intCreateBy);
        }

        public void Update(string strQueryString, string strCouseName, string strInstituteName, string strLocationName
            , Nullable<DateTime> strStartDate, Nullable<DateTime> strEndDate, string strRemark, int? intCreateBy, int? intTrainHisId)
        {
            dal.Update(strQueryString, strCouseName, strInstituteName, strLocationName, strStartDate,
                strEndDate, strRemark, intCreateBy, intTrainHisId);
        }

        public void Delete(int? intCreateBy, int? intTrainHisId, string strQueryString)
        {
            dal.Delete(intCreateBy, intTrainHisId, strQueryString);
        }

        public bool CheckValueSubmit(int? intTrainHisId)
        {
           return dal.CheckValueSubmit(intTrainHisId);
        }

        public bool CheckValueDelete(int? intTrainHisId)
        {
            return dal.CheckValueDelete(intTrainHisId);
        }

        public DataTable LoadInstitutes()
        {
            return dal.LoadInstitutes();
        }
    }
}